<template>
  <div class="header">
    <span @click="toggle">
      <el-icon-expand v-if="collapse" />
      <el-icon-fold v-else />
    </span>
  </div>
</template>

<script setup lang="ts">
defineOptions({
  name: 'NavHeader',
})
const porps = defineProps<{
  collapse: boolean
}>()
const emits = defineEmits(['update:collapse'])
const toggle = () => {
  emits('update:collapse', !porps.collapse)
}
</script>

<style scoped>
.header {
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
}
</style>
